package com.bsfcs.rag.repository;

import com.bsfcs.rag.entity.ReturnColl;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface ReturnCollRepository extends JpaRepository<ReturnColl, String>  {
    @Query("SELECT parent_id, code, payment_of_name, performance_amount, performance_date, " +
            "proportion_amount, planned_amount, planned_time, refund_money, payment_date, payment_status, billstatus " +
            "FROM ReturnColl  WHERE parent_id = :contrCarryId")
    Optional<ReturnColl> findByContrCarryId(String contrCarryId);
}
